-
-
Couldn't load subscription status.
- Fork 150
refactor(ruff): comply to ANN206, PLC0105, etc. #1445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2dcb52f to
d8cb890
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really convinced about the value of forcing ANN on the tests files but fine since you already did the work.
@Dr-Irv let me know if you are onboard with the change of name for S2_CT to S2_contra and I will merge after.
The idea originated from #1405 (review). |
|
Thanks @cmp0xff |
| return super().astype(dtype, copy=copy) | ||
|
|
||
| def __setitem__(self, key, value) -> None: | ||
| def __setitem__(self, key: object, value: decimal._DecimalNew) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is incorrect. It could be decimal._DecimalNew or list[decimal._DecimalNew]
If you do that, I think the ignores can be removed, and, if not, you can add assert isinstance(value, list)
Or it might need to be another type of Sequence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ec57e21 it is hard, because Decimal can be constructed from both a scalar and from tuple[int, Sequence[int], int], which is an iterable itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one comment.
* classify ann * mypy * fix(comment): #1445 (comment)
*.pyiANN206,ANN401,PLC0105ANN401is permanently ignoredtests/*ANNexcept forANN401ANN401andARGare permanently ignoredKnown issue
tests/extension/decimal/array.py is a bit ugly now, hopefully it's okay. We can improve when we do typing for the arrays.